import { IsNumber, IsOptional } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';

export class QueryOrderDto {
  @ApiProperty({ description: '页码', required: false, default: 1 })
  @IsNumber()
  @IsOptional()
  pageNum?: number = 1;

  @ApiProperty({ description: '每页数量', required: false, default: 10 })
  @IsNumber()
  @IsOptional()
  pageSize?: number = 10;

  @ApiProperty({ description: '订单状态', required: false })
  @IsNumber()
  @IsOptional()
  status?: number;

  @ApiProperty({
    description: '是否作为买家查询',
    required: false,
    default: true,
  })
  @IsOptional()
  asBuyer?: boolean = true;
}
